import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import { StagewiseToolbar } from '@stagewise/toolbar-vue'

// 创建Vue应用
const app = createApp(App)

// 使用插件
app.use(createPinia())
app.use(router)
app.use(ElementPlus)

// 仅在开发模式下初始化stagewise工具栏
if (process.env.NODE_ENV === 'development') {
  const stagewiseConfig = {
    plugins: []
  }
  app.component('StagewiseToolbar', StagewiseToolbar)
  app.provide('stagewiseConfig', stagewiseConfig)
}

// 挂载应用
app.mount('#app') 